package com.square.service.redis.consumer.fallback;

import com.baomidou.mybatisplus.extension.api.R;
import com.square.service.common.handler.ApiCode;
import com.square.service.redis.consumer.feign.RedisFeign;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author : 王苏
 * @since : 2021/4/17 9:30
 */
@Component
public class RedisFeignFallback implements RedisFeign {

    @Override
    public R<?> setExpire(String key, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getExpire(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> hasKey(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> delete(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> get(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> set(String key, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> set(String key, Object value, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> increment(String key, long delta) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> decreasing(String key, long delta) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getHashMap(String key, String item) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getHashMap(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setHashMap(String key, Map<String, Object> map) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setHashMap(String key, Map<String, Object> map, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setHashMap(String key, String item, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setHashMap(String key, String item, Object value, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> deleteHashMap(String key, Object... item) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> hasKeyForHashMap(String key, String item) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> incrementForHashMap(String key, String item, double by) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> decreasingForHashMap(String key, String item, double by) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getSet(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> hasKeyForSet(String key, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setSet(String key, Object... values) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setSet(String key, long time, Object... values) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getSetSize(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> removeSet(String key, Object... values) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getList(String key, long start, long end) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getListSize(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getListObjByIndex(String key, long index) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setList(String key, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setList(String key, Object value, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setList(String key, List<Object> value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setList(String key, List<Object> value, long time) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> updateListObjByIndex(String key, long index, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> removeList(String key, long count, Object value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> setZSet(String key, Object value, Double score) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> removeZSet(String key, String value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> incrementForZSet(String key, String value, double score) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getZSetScore(String key, String value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getZSetRank(String key, String value) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getZSetSize(String key) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }

    @Override
    public R<?> getZSetRange(String key, int start, int end) {
        return R.failed(ApiCode.REDIS_SERVICE_EXCEPTION);
    }
}
